package com.groupsix.entity;

import java.util.ArrayList;
import java.util.List;

public class DormitoryinfoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DormitoryinfoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDIdIsNull() {
            addCriterion("d_id is null");
            return (Criteria) this;
        }

        public Criteria andDIdIsNotNull() {
            addCriterion("d_id is not null");
            return (Criteria) this;
        }

        public Criteria andDIdEqualTo(Integer value) {
            addCriterion("d_id =", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdNotEqualTo(Integer value) {
            addCriterion("d_id <>", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdGreaterThan(Integer value) {
            addCriterion("d_id >", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("d_id >=", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdLessThan(Integer value) {
            addCriterion("d_id <", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdLessThanOrEqualTo(Integer value) {
            addCriterion("d_id <=", value, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdIn(List<Integer> values) {
            addCriterion("d_id in", values, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdNotIn(List<Integer> values) {
            addCriterion("d_id not in", values, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdBetween(Integer value1, Integer value2) {
            addCriterion("d_id between", value1, value2, "dId");
            return (Criteria) this;
        }

        public Criteria andDIdNotBetween(Integer value1, Integer value2) {
            addCriterion("d_id not between", value1, value2, "dId");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidIsNull() {
            addCriterion("s_dormitoryid is null");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidIsNotNull() {
            addCriterion("s_dormitoryid is not null");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidEqualTo(Integer value) {
            addCriterion("s_dormitoryid =", value, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidNotEqualTo(Integer value) {
            addCriterion("s_dormitoryid <>", value, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidGreaterThan(Integer value) {
            addCriterion("s_dormitoryid >", value, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidGreaterThanOrEqualTo(Integer value) {
            addCriterion("s_dormitoryid >=", value, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidLessThan(Integer value) {
            addCriterion("s_dormitoryid <", value, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidLessThanOrEqualTo(Integer value) {
            addCriterion("s_dormitoryid <=", value, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidIn(List<Integer> values) {
            addCriterion("s_dormitoryid in", values, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidNotIn(List<Integer> values) {
            addCriterion("s_dormitoryid not in", values, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidBetween(Integer value1, Integer value2) {
            addCriterion("s_dormitoryid between", value1, value2, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andSDormitoryidNotBetween(Integer value1, Integer value2) {
            addCriterion("s_dormitoryid not between", value1, value2, "sDormitoryid");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingIsNull() {
            addCriterion("d_dormbuilding is null");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingIsNotNull() {
            addCriterion("d_dormbuilding is not null");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingEqualTo(String value) {
            addCriterion("d_dormbuilding =", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingNotEqualTo(String value) {
            addCriterion("d_dormbuilding <>", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingGreaterThan(String value) {
            addCriterion("d_dormbuilding >", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingGreaterThanOrEqualTo(String value) {
            addCriterion("d_dormbuilding >=", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingLessThan(String value) {
            addCriterion("d_dormbuilding <", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingLessThanOrEqualTo(String value) {
            addCriterion("d_dormbuilding <=", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingLike(String value) {
            addCriterion("d_dormbuilding like", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingNotLike(String value) {
            addCriterion("d_dormbuilding not like", value, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingIn(List<String> values) {
            addCriterion("d_dormbuilding in", values, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingNotIn(List<String> values) {
            addCriterion("d_dormbuilding not in", values, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingBetween(String value1, String value2) {
            addCriterion("d_dormbuilding between", value1, value2, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDDormbuildingNotBetween(String value1, String value2) {
            addCriterion("d_dormbuilding not between", value1, value2, "dDormbuilding");
            return (Criteria) this;
        }

        public Criteria andDBedtotalIsNull() {
            addCriterion("d_bedtotal is null");
            return (Criteria) this;
        }

        public Criteria andDBedtotalIsNotNull() {
            addCriterion("d_bedtotal is not null");
            return (Criteria) this;
        }

        public Criteria andDBedtotalEqualTo(String value) {
            addCriterion("d_bedtotal =", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalNotEqualTo(String value) {
            addCriterion("d_bedtotal <>", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalGreaterThan(String value) {
            addCriterion("d_bedtotal >", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalGreaterThanOrEqualTo(String value) {
            addCriterion("d_bedtotal >=", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalLessThan(String value) {
            addCriterion("d_bedtotal <", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalLessThanOrEqualTo(String value) {
            addCriterion("d_bedtotal <=", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalLike(String value) {
            addCriterion("d_bedtotal like", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalNotLike(String value) {
            addCriterion("d_bedtotal not like", value, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalIn(List<String> values) {
            addCriterion("d_bedtotal in", values, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalNotIn(List<String> values) {
            addCriterion("d_bedtotal not in", values, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalBetween(String value1, String value2) {
            addCriterion("d_bedtotal between", value1, value2, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedtotalNotBetween(String value1, String value2) {
            addCriterion("d_bedtotal not between", value1, value2, "dBedtotal");
            return (Criteria) this;
        }

        public Criteria andDBedIsNull() {
            addCriterion("d_bed is null");
            return (Criteria) this;
        }

        public Criteria andDBedIsNotNull() {
            addCriterion("d_bed is not null");
            return (Criteria) this;
        }

        public Criteria andDBedEqualTo(String value) {
            addCriterion("d_bed =", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedNotEqualTo(String value) {
            addCriterion("d_bed <>", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedGreaterThan(String value) {
            addCriterion("d_bed >", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedGreaterThanOrEqualTo(String value) {
            addCriterion("d_bed >=", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedLessThan(String value) {
            addCriterion("d_bed <", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedLessThanOrEqualTo(String value) {
            addCriterion("d_bed <=", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedLike(String value) {
            addCriterion("d_bed like", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedNotLike(String value) {
            addCriterion("d_bed not like", value, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedIn(List<String> values) {
            addCriterion("d_bed in", values, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedNotIn(List<String> values) {
            addCriterion("d_bed not in", values, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedBetween(String value1, String value2) {
            addCriterion("d_bed between", value1, value2, "dBed");
            return (Criteria) this;
        }

        public Criteria andDBedNotBetween(String value1, String value2) {
            addCriterion("d_bed not between", value1, value2, "dBed");
            return (Criteria) this;
        }

        public Criteria andANameIsNull() {
            addCriterion("a_name is null");
            return (Criteria) this;
        }

        public Criteria andANameIsNotNull() {
            addCriterion("a_name is not null");
            return (Criteria) this;
        }

        public Criteria andANameEqualTo(String value) {
            addCriterion("a_name =", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameNotEqualTo(String value) {
            addCriterion("a_name <>", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameGreaterThan(String value) {
            addCriterion("a_name >", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameGreaterThanOrEqualTo(String value) {
            addCriterion("a_name >=", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameLessThan(String value) {
            addCriterion("a_name <", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameLessThanOrEqualTo(String value) {
            addCriterion("a_name <=", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameLike(String value) {
            addCriterion("a_name like", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameNotLike(String value) {
            addCriterion("a_name not like", value, "aName");
            return (Criteria) this;
        }

        public Criteria andANameIn(List<String> values) {
            addCriterion("a_name in", values, "aName");
            return (Criteria) this;
        }

        public Criteria andANameNotIn(List<String> values) {
            addCriterion("a_name not in", values, "aName");
            return (Criteria) this;
        }

        public Criteria andANameBetween(String value1, String value2) {
            addCriterion("a_name between", value1, value2, "aName");
            return (Criteria) this;
        }

        public Criteria andANameNotBetween(String value1, String value2) {
            addCriterion("a_name not between", value1, value2, "aName");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}